package com.dianping.cat.core.dal;

import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class TaskDao
  extends AbstractDao {
/* 10 */   public Task createLocal() { return new Task(); }





  public int deleteByPK(Task proto) throws DalException { return getQueryEngine().deleteSingle(TaskEntity.DELETE_BY_PK, proto); }




  public Task findByPK(int keyId, Readset<Task> readset) throws DalException {
    Task proto = new Task();

/* 24 */     proto.setKeyId(keyId);

/* 26 */     return (Task)getQueryEngine().querySingle(TaskEntity.FIND_BY_PK, proto, readset);
  }






  public Task findByStatusConsumer(int status, String consumer, Readset<Task> readset) throws DalException {
/* 35 */     Task proto = new Task();

/* 37 */     proto.setStatus(status);
/* 38 */     proto.setConsumer(consumer);

/* 40 */     return (Task)getQueryEngine().querySingle(TaskEntity.FIND_BY_STATUS_CONSUMER, proto, readset);
  }








/* 50 */   protected Class<?>[] getEntityClasses() { return new Class[] { TaskEntity.class }; }



/* 54 */   public int insert(Task proto) throws DalException { return getQueryEngine().insertSingle(TaskEntity.INSERT, proto); }





/* 60 */   public int updateByPK(Task proto, Updateset<Task> updateset) throws DalException { return getQueryEngine().updateSingle(TaskEntity.UPDATE_BY_PK, proto, updateset); }






/* 67 */   public int updateTodoToDoing(Task proto, Updateset<Task> updateset) throws DalException { return getQueryEngine().updateSingle(TaskEntity.UPDATE_TODO_TO_DOING, proto, updateset); }






/* 74 */   public int updateDoingToDone(Task proto, Updateset<Task> updateset) throws DalException { return getQueryEngine().updateSingle(TaskEntity.UPDATE_DOING_TO_DONE, proto, updateset); }






/* 81 */   public int updateFailureToDone(Task proto, Updateset<Task> updateset) throws DalException { return getQueryEngine().updateSingle(TaskEntity.UPDATE_FAILURE_TO_DONE, proto, updateset); }






/* 88 */   public int updateStatusToTodo(Task proto, Updateset<Task> updateset) throws DalException { return getQueryEngine().updateSingle(TaskEntity.UPDATE_STATUS_TO_TODO, proto, updateset); }






/* 95 */   public int updateDoingToFail(Task proto, Updateset<Task> updateset) throws DalException { return getQueryEngine().updateSingle(TaskEntity.UPDATE_DOING_TO_FAIL, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-core-3.0.0.jar!/com/dianping/cat/core/dal/TaskDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */